//
//  UINavigation+Extension.swift
//  EasyDana
//
//  Created by mac on 2024/10/17.
//

import Foundation

extension UINavigationController {
    func replace(viewController: UIViewController, animated: Bool) {
        var viewControllers = self.viewControllers
        viewControllers.removeLast()
        viewControllers.append(viewController)
        self.setViewControllers(viewControllers, animated: animated)
    }
}
